<?php
namespace app\admin\model;
use think\Model;
use think\Db;
use app\common\traits\GetInfomationTrait;
class Role extends Model
{
	use GetInfomationTrait;
   public $table="role";
   public static $mytable="role";

   public static function getUserRole($id){
   	   $role_id=Db::table('role_user')->where('user_id',$id)->find();
   	   if($role_id){
           return $role=Role::get($role_id['role_id']);
   	   }
   	   return null;
   }
}